﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DHISInteroperability.Resources
{
    static class authority
    {
        public const string F_CHART_PUBLIC_ADD = "F_CHART_PUBLIC_ADD";
        public const string F_METADATA_SUBSET_IMPORT = "F_METADATA_SUBSET_IMPORT";
        public const string F_DASHBOARD_PUBLIC_ADD = "F_DASHBOARD_PUBLIC_ADD";
        public const string F_MAP_PUBLIC_ADD = "F_MAP_PUBLIC_ADD";
        public const string ALL = "ALL";
        public const string F_CHART_EXTERNAL = "F_CHART_EXTERNAL";
        public const string F_APPROVE_DATA_LOWER_LEVELS = "F_APPROVE_DATA_LOWER_LEVELS";
        public const string F_METADATA_EXPORT = "F_METADATA_EXPORT";
        public const string F_METADATA_IMPORT = "F_METADATA_IMPORT";
        public const string F_REPORTTABLE_PUBLIC_ADD = "F_REPORTTABLE_PUBLIC_ADD";
        public const string F_REPORTTABLE_EXTERNAL = "F_REPORTTABLE_EXTERNAL";
        public const string F_APPROVE_DATA = "F_APPROVE_DATA";
        public const string F_METADATA_SUBSET_EXPORT = "F_METADATA_SUBSET_EXPORT";
        public const string F_MAP_EXTERNAL = "F_MAP_EXTERNAL";
        public const string F_USERGROUP_PUBLIC_ADD = "F_USERGROUP_PUBLIC_ADD";

        private static readonly List<string> authorities;

        static authority()
        {
            authorities = new List<string>
            {
                F_APPROVE_DATA,             F_APPROVE_DATA_LOWER_LEVELS, 
                F_CHART_EXTERNAL,           F_CHART_PUBLIC_ADD, 
                F_DASHBOARD_PUBLIC_ADD,     F_MAP_EXTERNAL,
                F_MAP_PUBLIC_ADD,           F_METADATA_EXPORT,
                F_METADATA_IMPORT,          F_METADATA_SUBSET_EXPORT,
                F_METADATA_SUBSET_IMPORT,   F_REPORTTABLE_EXTERNAL,
                F_REPORTTABLE_PUBLIC_ADD,   F_USERGROUP_PUBLIC_ADD
            };
        }

        /// <summary>
        /// List of all known authorities used in DHIS2 according to version 2.16
        /// </summary>
        public static List<string> Authorities
        {
            get { return authorities; }
        }
    }
}
